Skip to content

[IO] Add UDP benchmarks - #97

Merged
FranzBusch merged 1 commit into
mainfrom
fb-udp-benchmarks
Nov 6, 2026
Merged

FranzBusch merged 1 commit into
mainfrom
fb-udp-benchmarks

Conversation

@FranzBusch

Copy link
Copy Markdown
Member

Two new benchmarks for UDP:

  • UDPPingPong measures one round trip of a datagram.
  • UDPBurst sends 32 datagrams, then waits for one reply.
┌──────────────────────────────────────────────────────┬────────────────┬───────────────────┬────────────┬───────────┬───────────────┐
│                                                      │ Ping-pong wall │ Ping-pong mallocs │ Burst wall │ Burst CPU │ Burst mallocs │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ swift-platform-executors, epoll                      │ 4.4 µs         │ 0                 │ 39.9 µs    │ 40 µs     │ 0             │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ swift-platform-executors, io_uring                   │ 4.2 µs         │ 0                 │ 61.1 µs    │ 60 µs     │ 0             │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ NIO, handlers on the event loop                      │ 4.2 µs         │ 2.0               │ 34.4 µs    │ 30 µs     │ 35            │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ NIO, NIOAsyncChannel, tasks on the global executor   │ 81.2 µs        │ 8.1               │ 209 µs     │ 210 µs    │ 118           │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ NIO, NIOAsyncChannel, tasks pinned to the event loop │ 12.7 µs        │ 2.1               │ 131 µs     │ 130 µs    │ 35            │
└──────────────────────────────────────────────────────┴────────────────┴───────────────────┴────────────┴───────────┴───────────────┘

@FranzBusch
FranzBusch added this pull request to stack #96 October 23, 2026 13:00
@FranzBusch
FranzBusch requested a review from al45tair as a code owner October 23, 2026 13:00
Base automatically changed from fb-udp-connected to main November 6, 2026 14:57
Two new benchmarks for UDP:
- `UDPPingPong` measures one round trip of a datagram.
- `UDPBurst` sends 32 datagrams, then waits for one reply.

```
┌──────────────────────────────────────────────────────┬────────────────┬───────────────────┬────────────┬───────────┬───────────────┐
│                                                      │ Ping-pong wall │ Ping-pong mallocs │ Burst wall │ Burst CPU │ Burst mallocs │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ swift-platform-executors, epoll                      │ 4.4 µs         │ 0                 │ 39.9 µs    │ 40 µs     │ 0             │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ swift-platform-executors, io_uring                   │ 4.2 µs         │ 0                 │ 61.1 µs    │ 60 µs     │ 0             │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ NIO, handlers on the event loop                      │ 4.2 µs         │ 2.0               │ 34.4 µs    │ 30 µs     │ 35            │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ NIO, NIOAsyncChannel, tasks on the global executor   │ 81.2 µs        │ 8.1               │ 209 µs     │ 210 µs    │ 118           │
├──────────────────────────────────────────────────────┼────────────────┼───────────────────┼────────────┼───────────┼───────────────┤
│ NIO, NIOAsyncChannel, tasks pinned to the event loop │ 12.7 µs        │ 2.1               │ 131 µs     │ 130 µs    │ 35            │
└──────────────────────────────────────────────────────┴────────────────┴───────────────────┴────────────┴───────────┴───────────────┘
```
@FranzBusch
FranzBusch merged commit cf947f1 into main Nov 6, 2026
19 of 21 checks passed
@FranzBusch
FranzBusch deleted the fb-udp-benchmarks branch November 6, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants